module shifter_hier_bench;

	reg [15:0] In;
	reg [3:0] Cnt;
	reg [1:0] Op;
	wire [15:0] Out;
	shifter_hier DUT (.In(In),.Cnt(Cnt),.Op(Op),.Out(Out));
	integer k;

	initial
	begin
		In = 16'HFF00;
		for (k=0; k<=63; k=k+1)
			#5 {Op,Cnt}=k;
		#20	$finish;
	end
	//	Output monitors
	always@(Cnt)
	begin
		#1;
		if (Op==2'b00)
			$display("rotate left: A=%b Cnt=%H Out=%b",In,Cnt[3:0],Out);
		if (Op==2'b01)
			$display("shift left: A=%b Cnt=%H Out=%b",In,Cnt[3:0],Out);
		if (Op==2'b10)
			$display("shift right arithmetic: A=%b Cnt=%H Out=%b",In,Cnt[3:0],Out);
		if (Op==2'b11)
			$display("shift right logic: A=%b Cnt=%H Out=%b",In,Cnt[3:0],Out);
	end
endmodule
